home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 256 / SOMC Family Forum 256 - Disc 2.iso / ONLNEMAC / AOL / INSTALLA.7 / Online Files / AOLnet < prev    next >
Text File  |  1996-04-12  |  16KB  |  556 lines

  1. !*****************************************************************************
  2. !   C O P Y R I G H T   A N D   C O N F I D E N T I A L I T Y   N O T I C E
  3. !*****************************************************************************
  4. !
  5. !      Copyright ⌐ 1987-1996 America Online, Inc.  All rights reserved.
  6. !      This software contains valuable confidential and proprietary
  7. !      information of America Online, Inc. and is subject to applicable
  8. !      licensing agreements.  Unauthorized reproduction, transmission or
  9. !      distribution of this file and its contents is a violation of
  10. !      applicable laws.
  11. !
  12. !            A M E R I C A   O N L I N E   C O N F I D E N T I A L
  13. !
  14. !*****************************************************************************
  15.  
  16. !-------------------------------------------------
  17. !   AOLnet CCL for AO v2.1 and above
  18. !   By: Matt Day
  19. !-------------------------------------------------
  20. !
  21. !  Adding support for modems that report 31.2 and 33.6 connections. - RG, 3/08/96
  22. !
  23. !-------------------------------------------------
  24. !
  25. ! Connect Sequence:
  26. !
  27. -LABEL 0
  28. CanBtn 19               { if cancel button - just exit }
  29. Jsr "CheckPhoneLength"
  30. NewString sNetworkSync
  31. NewLngInt bHighSpeed
  32. SetVar bHighSpeed 0
  33. NewLngInt bSerSpeed
  34. SetVar bSerSpeed ~BAUD
  35. CheckPort "19" ~PORT
  36. DsplyMsg "Step 1:  Initializing modem"
  37. SetTries 0
  38. ChrDelay 2
  39. SerReset ~BAUD 0 8 1
  40.  
  41. IfEq Handshake 0
  42.  Jump "TurnHandshakeOff"
  43.  
  44. -Label TurnHandshakeOn 
  45. IfEq HH_ON ""
  46.  Jump "TurnHandshakeOff"
  47.  
  48. HSReset 0 1 17 19
  49. Jump "WakeUpModem"
  50.  
  51. -Label TurnHandshakeOff 
  52. HSReset 0 0 17 19
  53.  
  54. -Label WakeUpModem
  55. DsplyPic 1
  56. !
  57. !----------------------------------
  58. !
  59. -LABEL 1                { wake up the modem }
  60. Flush
  61. !-----------------------------------                        
  62. ZMIT "2" "$INIT$\0D"         { Send modem string; jump to 4 if empty}
  63. Pause 40            { Allow modem to settle between commands.}
  64. !
  65. -Label 2
  66. !
  67. ! *No longer allow +++ echoed as proof of initialization.*
  68. IfTries 0 "3"             { Only do this if we need to }
  69. ClrMchStr
  70. MatchStr "3" "OK"         
  71. MatchStr "3" ">"          { Special case for Avatex 1200 modems}
  72. MatchStr "3" "0\0D"      { Verbose is grandiose but terse ain't worse }
  73. !
  74. Pause 180               { Pause for 3 sec min gap }
  75. Xmit "+++"              { Get the modems attention}
  76. Pause 180               { Pause for 3 sec min gap }
  77. Xmit "$ATTENTION$H\0D"            {Hang up, just in case we were online}
  78. Wait 120                { Pause for 2 seconds, minimum gap required}
  79. !
  80. -Label 3 
  81. !-----------------------------------
  82. -LABEL 4                { just saw 'OK'- Set up modem }
  83. Flush
  84. !
  85. ClrMchStr
  86. MatchStr "5" "OK"         { We'd better be getting responses by now. }
  87. MatchStr "38" "ERROR"     { If not, something is wrong - we're gone. }
  88. MatchStr "5" ">"          {Special case for Avatex 1200}
  89. !
  90. Pause 40            { Allow modem to settle between commands.}
  91. IfEq Handshake 0
  92.   ZMIT "5" "$ATTENTION$$HH_OFF$$CONFIG$\0D"  { Send modem string; jump if empty}
  93. Else
  94.   ZMIT "5" "$ATTENTION$$HH_ON$$CONFIG$\0D"  { Send modem string; jump if empty}
  95. Wait 120                { Two seconds to get it right. }
  96. IncTries
  97. IfTries 1 "1"             { Try 1: Reset modem.  Try 2: Hang up/reset }
  98. Jump "33"
  99. !-----------------------------------
  100. -LABEL 5                { Now try to dial }
  101. DsplyMsg "Step 2:  Dialing ~PREF~NOCW~FONE"
  102. !
  103. ClrMchStr
  104. MatchStr "Got57600" "CONNECT 57600"
  105. MatchStr "Got57600" "CONNECT 57.6"
  106. MatchStr "Got38400" "CONNECT 38400"
  107. MatchStr "Got38400" "CONNECT 38.4"
  108. MatchStr "Got33600" "CONNECT 33600"
  109. MatchStr "Got33600" "CONNECT 33.6"
  110. MatchStr "Got31200" "CONNECT 31200"
  111. MatchStr "Got31200" "CONNECT 31.2"
  112. MatchStr "Got28800" "CONNECT 28800"
  113. MatchStr "Got28800" "CONNECT 28.8"
  114. MatchStr "Got26400" "CONNECT 26400"
  115. MatchStr "Got26400" "CONNECT 26.4"
  116. MatchStr "Got24000" "CONNECT 24000"
  117. MatchStr "Got24000" "CONNECT 24.0"
  118. MatchStr "Got21600" "CONNECT 21600"
  119. MatchStr "Got21600" "CONNECT 21.6"
  120. MatchStr "Got19200" "CONNECT 19200"
  121. MatchStr "Got19200" "CONNECT 19.2"
  122. MatchStr "Got16800" "CONNECT 16800"
  123. MatchStr "Got16800" "CONNECT 16.8"
  124. MatchStr "Got14400" "CONNECT 14400"
  125. MatchStr "Got14400" "CONNECT 14.4"
  126. MatchStr "Got12000" "CONNECT 12000"
  127. MatchStr "Got12000" "CONNECT 12.0"
  128. MatchStr "Got9600" "CONNECT 9600"
  129. MatchStr "Got7200" "CONNECT 7200"
  130. MatchStr "Got4800" "CONNECT 4800"    
  131. MatchStr "Got2400" "CONNECT 2400\0D"    
  132. MatchStr "Got2400" "CONNECT 2400 "    
  133. MatchStr "Got2400" "CONNECT 2400/"    
  134. MatchStr "Got1200" "CONNECT 1200\0D"
  135. MatchStr "Got1200" "CONNECT 1200 "
  136. MatchStr "Got1200" "CONNECT 1200/"
  137. MatchStr "Got300" "CONNECT 300"
  138. MatchStr "Got300" "CONNECT\0D"     {assume "CONNECT" means the current baud rate}
  139. MatchStr "27" "NO ANSWER"      
  140. MatchStr "40" "NO DIAL"          
  141. MatchStr "41" "VOICE"           
  142. MatchStr "42" "NO CARRIER"     
  143. MatchStr "26" "BUSY"
  144. MatchStr "38" "ERROR"
  145. !
  146. CanBtn 18               { if cancel button hit, hangUp then exit }
  147. Pause 30
  148. Xmit "$ATTENTION$D~TONE~PREF~NOCW~FONE\0D"
  149. !                       { jump to label #13 if match }
  150. Wait 3600               { wait 40 seconds for CONNECT msg from modem }
  151. IFTRIES 1 "1"             {If we can't connect, try resetting the modem}
  152. !
  153. !
  154. ! This CCL section formerly checked for "300" through "9600" for
  155. ! no apparent reason - we do not support MNP connections and we'd
  156. ! never see that response string at this point anyway.
  157. !
  158. Jump "43"                 { else hang up phone & exit  }
  159. !
  160. !-----------------------------------
  161. !
  162. -Label Got300
  163. DsplyMsg "Step 3:  Connecting at 300 bps"
  164. SetSpeed 300
  165. IfEq Handshake 0
  166.  SetVar bSerSpeed 300
  167. Jump "MayReset"
  168. !
  169. -Label Got1200
  170. DsplyMsg "Step 3:  Connecting at 1200 bps"
  171. SetSpeed 1200
  172. IfEq Handshake 0
  173.  SetVar bSerSpeed 1200
  174. Jump "MayReset"
  175. !
  176. -Label Got2400
  177. DsplyMsg "Step 3:  Connecting at 2400 bps"
  178. SetSpeed 2400
  179. IfEq Handshake 0
  180.  SetVar bSerSpeed 2400
  181. Jump "MayReset"
  182. !
  183. -Label Got4800
  184. DsplyMsg "Step 3:  Connecting at 4800 bps"
  185. SetSpeed 4800
  186. IfEq Handshake 0
  187.  SetVar bSerSpeed 4800
  188. Jump "MayReset"
  189. !
  190. -Label Got7200
  191. DsplyMsg "Step 3:  Connecting at 7200 bps"
  192. SetSpeed 7200
  193. IfEq Handshake 0
  194.  SetVar bSerSpeed 7200
  195. Jump "MayReset"
  196. !
  197. -Label Got9600
  198. DsplyMsg "Step 3:  Connecting at 9600 bps"
  199. SetSpeed 9600
  200. IfEq Handshake 0
  201.  SetVar bSerSpeed 9600
  202. Jump "MayReset"
  203. !
  204. -Label Got12000
  205. DsplyMsg "Step 3:  Connecting at 12000 bps"
  206. SetSpeed 12000
  207. Jump "NoReset"
  208. !
  209. -Label Got14400
  210. DsplyMsg "Step 3:  Connecting at 14400 bps"
  211. SetSpeed 14400
  212. Jump "NoReset"
  213. !
  214. -Label Got16800
  215. DsplyMsg "Step 3:  Connecting at 16800 bps"
  216. SetSpeed 16800
  217. Jump "NoReset"
  218. !
  219. -Label Got19200
  220. DsplyMsg "Step 3:  Connecting at 19200 bps"
  221. SetSpeed 19200
  222. Jump "NoReset"
  223. !
  224. -Label Got21600
  225. DsplyMsg "Step 3:  Connecting at 21600 bps"
  226. SetSpeed 21600
  227. Jump "NoReset"
  228. !
  229. -Label Got24000
  230. DsplyMsg "Step 3:  Connecting at 24000 bps"
  231. SetSpeed 24000
  232. Jump "NoReset"
  233. !
  234. -Label Got26400
  235. DsplyMsg "Step 3:  Connecting at 26400 bps"
  236. SetSpeed 26400
  237. Jump "NoReset"
  238. !
  239. -Label Got28800
  240. DsplyMsg "Step 3:  Connecting at 28800 bps"
  241. SetSpeed 28800
  242. Jump "NoReset"
  243. !
  244. -Label Got31200
  245. DsplyMsg "Step 3:  Connecting at 31200 bps"
  246. SetSpeed 31200
  247. Jump "NoReset"
  248. !
  249. -Label Got33600
  250. DsplyMsg "Step 3:  Connecting at 33600 bps"
  251. SetSpeed 33600
  252. Jump "NoReset"
  253. !
  254. -Label Got38400
  255. DsplyMsg "Step 3:  Connecting at 38400 bps"
  256. SetSpeed 38400
  257. Jump "NoReset"
  258. !
  259. -Label Got57600
  260. DsplyMsg "Step 3:  Connecting at 57600 bps"
  261. SetSpeed 57600
  262. Jump "NoReset"
  263. !
  264. !-----------------------------------
  265. !
  266. -Label MayReset
  267. IfEq Handshake 1
  268.  Jump "12"
  269. Pause 180
  270. Xmit "+++"                                                                { Go to command state }
  271. Pause 180
  272. SerReset bSerSpeed 0 8 1
  273. Wait 60
  274. MatchStr "12" "CONNECT"
  275. MatchStr "45" "NO CARRIER"     
  276. Xmit "$ATTENTION$O\0D"                { Go back to online state }
  277. Wait 60
  278. Jump "12"
  279. !
  280. -Label NoReset
  281. IfEq Handshake 0
  282.  Jump "44"
  283. !
  284. -LABEL 12               { Modem just sent 'CONNECT' message }
  285. Pause 20
  286. ChrDelay 20      
  287. DsplyPic 2
  288. !        
  289. -LABEL 13               {  Establishing Connection }
  290. Pause 30
  291. !
  292. ClrMchStr
  293. MatchStr "ANSTry" "UQKT1"
  294. MatchStr "SprintTry" "UQKT2"
  295. MatchStr "ANSTry" "ANSNet"
  296. MatchStr "UUNetTry" "UU.NET"
  297. MatchStr "UUNetTry" "SATURN.BBN"
  298. MatchStr "SprintTry" "SPRINT-IP"
  299. MatchStr "45" "NO CARRIER"     
  300. !
  301. Wait 4800                {Try to sync up to four times}
  302. DsplyMsg "Timed Out..."
  303. Jump "ConnectFailure"
  304. !
  305. !-------------------------------
  306. !
  307. -LABEL ANSTry               { = for term ID}
  308. !                         Sending Terminal Identifier
  309. !
  310. ChrDelay 2
  311. Pause 20
  312. DsplyMsg "Step 4: Requesting network attention"
  313. Xmit "aol\0D"
  314. DsplyMsg "Step 5: Talking to network"
  315. !
  316. Jump "CheckConnected"
  317. !
  318. -Label UUNetTry
  319. DsplyMsg "Step 4:  Requesting network attention"
  320. ClrMchStr
  321. MatchStr "SendUUNetPassword" "Password"
  322. MatchStr "45" "NO CARRIER"     
  323. Xmit "aolnet\0D"
  324. Wait 2000
  325. jump ConnectFailure
  326. !
  327. -Label SendUUNetPassword
  328. DsplyMsg "Step 5: Talking to network"
  329. Xmit "A0L2aNet\0D"
  330. Jump "CheckConnected"
  331. !
  332. -Label SprintTry
  333. DsplyMsg "Step 4:  Requesting network attention"
  334. ClrMchStr
  335. MatchStr "SendSprintPassword" "Password"
  336. MatchStr "45" "NO CARRIER"     
  337. Xmit "aol\0D"
  338. Wait 2000
  339. jump ConnectFailure
  340. !
  341. -Label SendSprintPassword
  342. DsplyMsg "Step 5: Talking to network"
  343. Xmit "aol\0D"
  344. Jump "CheckConnected"
  345.  
  346. !
  347. -Label CheckConnected
  348. DsplyMsg "Step 6: Connecting to America Online"
  349. ClrMchStr
  350. MatchStr "ConnectSuccess" "CONNECTED"
  351. MatchStr "ConnectSuccess" "OPEN"
  352. MatchStr "ConnectFailure" "UNAVAILABLE"
  353. MatchStr "ConnectFailure" "CONNECT FAILED"
  354. MatchStr "ConnectFailure" "NOT AVAILABLE"
  355. MatchStr "ConnectFailure" "UNREACHABLE"
  356. MatchStr "ConnectFailure" "NO CONNECTION"
  357. MatchStr "SyncFailure" "BAD PASSWORD"
  358. MatchStr "SyncFailure" "LOGIN INVALID"
  359. Wait 2700
  360. jump "ConnectFailure"
  361. !
  362. -Label ConnectSuccess
  363. DsplyMsg "Step 7: Checking Password"
  364. Exit 0
  365. !
  366. !-----------------------------------
  367. !
  368. -Label 18               { User aborted sequence }
  369. Exit -51
  370. !
  371. -Label 19               { User aborted sequence...dont need to hang up though}
  372. Exit -111
  373. !
  374. !-----------------------------------
  375. !
  376. -Label 26              {Busy phone}
  377.  
  378. IfEq ~ATMP 0
  379. DsplyMsg "The number dialed is busy. Trying second number."
  380. Talert "The number dialed is busy.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  381. IfEq ~ATMP 1
  382. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  383. Exit -1
  384. !
  385. !-----------------------------------
  386. !
  387. !
  388. !
  389. -Label 27              {No Answer}
  390.  
  391. IfEq ~ATMP 0
  392. DsplyMsg "The number dialed is not answering. Trying second number."
  393. TAlert "The number dialed is not answering.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  394. IfEq ~ATMP 1
  395. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  396. Exit -1
  397. !
  398. !---------------------------------------------
  399. !
  400. -Label 28
  401.  
  402. Talert "The access company failed to respond.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  403. IfEq ~ATMP 1
  404. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  405. Exit -1
  406. !
  407. !-----------------------------------
  408. !
  409. -Label ConnectFailure              {not_avail}
  410.  
  411. TAlert "The final connection step to ~APPL did not complete.  Please try again later."
  412. Jump "36"
  413. !
  414. !-----------------------------------
  415. !
  416. -Label SyncFailure                     {CCL Sync problem}
  417.  
  418. TAlert "An error has occured while attempting to connect to America Online.\0D\Normally, trying again will resolve this problem."
  419. Jump "36"
  420. !
  421. !-----------------------------------
  422. !
  423. -Label 33              {no response from modem}
  424.  
  425. TAlert "~APPL was unable to initialize your modem.\0D\0D1. Turn your modem off, then back on.\0D2. Check your modem cable connections.\0D"
  426. IfEq ~ATMP 1
  427. OneAlert 1 "3  Click on Setup, and verify your modem type selection.\0D\0DFor more information, select Help from the Apple menu."
  428. Exit -1
  429. !
  430. !-----------------------------------
  431. -Label 35
  432. Exit -1
  433. !
  434. -Label 36
  435. IfEq ~ATMP 1
  436. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  437. Exit -1
  438. !-----------------------------------
  439. ! Some new error messages since error #1 is getting kind of meaningless.
  440. -Label 37          { Time-Out }
  441. TAlert "It has taken too long to process your connection.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
  442. IfEq ~ATMP 1
  443. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  444. Exit -1
  445. -Label 38          {Modem command error}
  446. TAlert "Your modem is not accepting our commands.\0D\0D1. Turn your modem off, then back on.\0D2. Click on Setup, and verify your modem type selection."
  447. Jump "36"
  448. !
  449. -Label 40
  450.  
  451. TAlert "The modem has reported no dial tone.\0D1. Check the phone line connections.\0D2. Make sure the line from the wall is connected to the jack labeled Line, Telco, Wall, or Jack.\0D"
  452. IfEq ~ATMP 1
  453. OneAlert 1 "3. Use a telephone to check for a dial tone.\0D\0DFor more information, select Help from the Apple menu."
  454. Exit -1
  455. !
  456. -Label 41
  457.  
  458. TAlert "The number dialed did not connect to the access company.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
  459. IfEq ~ATMP 1
  460. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  461. Exit -1
  462. !
  463. -Label 42
  464.  
  465. TAlert "The modem was unable to get a carrier signal.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
  466. IfEq ~ATMP 1
  467. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  468. Exit -1
  469. !
  470. -Label 43
  471.  
  472. TAlert "The modem detected a timeout.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
  473. IfEq ~ATMP 1
  474. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  475. Exit -1
  476. !
  477. -Label 44
  478. OneAlert 1 "Connection speeds above 9600 bps require the use of Hardware Handshaking."
  479. Exit -1
  480. !
  481. -Label 45
  482. OneAlert 1 "The modem has lost carrier signal.  Please try signing on again."
  483. Exit -1
  484. !
  485. !------------------------------------
  486. -Label CheckPhoneLength
  487. !
  488. NewString sPhoneNumber
  489. SetVar sPhoneNumber ~FONE
  490. NewLngInt lCount
  491. SetVar lCount 6
  492. !
  493. -Label TopPhoneLoop
  494. IfEq lCount 0
  495. Jump "FinishPhoneLength"
  496. DecVar sPhoneNumber
  497. DecVar lCount
  498. Jump "TopPhoneLoop"
  499. !
  500. -Label FinishPhoneLength
  501. IfEq sPhoneNumber ""
  502. Jump "EmptyPhone"
  503. Return
  504. !
  505. -Label EmptyPhone
  506. OneAlert 1 "You must enter phone numbers before signing on.\0D\0DSelect ""Setup"" and verify the phone numbers you have entered."
  507. Exit -111
  508. !------------------------------------
  509. !
  510. *-Label 0                {Hangup Sequence}
  511. *CanBtn 2
  512. !
  513. *Flush
  514. !
  515. *SetTries 0            {DMC: see if we can get the modem's attention}
  516. *ClrMchStr
  517. *MatchStr "1" "OK"         { Dont look for an echo, may be a}
  518. *MatchStr "1" "NO"         { false echo.  Any type of match is good}
  519. *MatchStr "1" ">"          { Special case for Avatex 1200 modems}
  520. !
  521. *Pause 180               { Pause for 3 sec min gap }
  522. *Xmit "+++"              { Get the modems attention}
  523. *Pause 180               { Pause for 3 sec min gap }
  524. *IfTries 0 "1"
  525. !
  526. *ClrMchStr
  527. *MatchStr "1" "OK"
  528. *MatchStr "2" "CARRIER"    {Any type of match is good}
  529. *MatchStr "1" ">"         { Special case for Avatex 1200 modems}
  530. !
  531. *Pause 180               { Pause for 3 sec min gap }
  532. *Xmit "+++"              { Get the modems attention}
  533. *Pause 180               { Pause for 3 sec min gap }
  534. !
  535. *-Label 1
  536. *IncTries
  537. *ClrMchStr
  538. *MatchStr "2" "ERROR"
  539. *MatchStr "2" "OK"
  540. *MatchStr "2" "CARRIER"
  541. *MatchStr "2" ">"          { Special case for Avatex 1200 modems}
  542. !
  543. *Pause 40
  544. *Xmit "$ATTENTION$H\0D"
  545. *Wait 300
  546. !
  547. *-Label 2
  548. *Pause 40                { Allow modem to settle between commands.}
  549. *ZMIT "3" "$ATTENTION$$REST$\0D"         { Send shutdown string}
  550. !
  551. *-Label 3
  552. *Exit 0
  553. !
  554. ###
  555.